package com.hlkj.pay.service.pay;
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

import java.util.List;

import com.hlkj.framework.common.pojo.PageResult;
import com.hlkj.pay.dto.pay.PayChannelQueryDto;
import com.hlkj.pay.enums.PayEnums;
import com.hlkj.pay.infrastructure.model.pay.PayChannelDO;
import com.hlkj.pay.infrastructure.model.pay.PayChannelRequestDO;
/**
 * @author HlpayTeam
 * @date 2024/09/23 11:22
 */
public interface IPayChannelService {
	/**
	 * page
	 * @param payChannelQueryDto
	 * @return
	 */
	PageResult<PayChannelDO> queryPage(PayChannelQueryDto payChannelQueryDto);
	/**
	 * list
	 * @param payChannelQueryDto
	 * @return
	 */
	List<PayChannelDO> queryList(PayChannelQueryDto payChannelQueryDto);
	/**
	 * detail
	 * @param id
	 * @return
	 */
	PayChannelDO detail(Long id);
	/**
	 * query by code
	 * @param code
	 * @return
	 */
	PayChannelDO queryByCode(String code);
	/**
	 * query by code
	 * @param codes
	 * @return
	 */
	List<PayChannelDO> queryByCodes(List<String> codes);
	/**
	 * query by name
	 * @param name
	 * @return
	 */
	PayChannelDO queryByName(String name);
	/**
	 * save
	 * @param payChannelDO
	 */
	void save(PayChannelDO payChannelDO);
	/**
	 * update
	 * @param payChannelDO
	 */
	void update(PayChannelDO payChannelDO);
	/**
	 * del
	 * @param id
	 */
	void del(String code);
	/**
	 * update status
	 * @param id
	 * @param status
	 */
	void updatePayWayStatus(String code, Integer status);
	/**
	 *
	 * @param payChannelRequestDO
	 */
	void saveRequest(PayChannelRequestDO payChannelRequestDO, PayEnums.CHANNEL_REQUEST_TYPE channelRequestType);
	void saveRequestLocal(PayChannelRequestDO payChannelRequestDO, PayEnums.CHANNEL_REQUEST_TYPE channelRequestType);
	void consumerRequest(List<PayChannelRequestDO> payChannelRequestList);
	/**
	 *
	 * @param requestId
	 * @return
	 */
	PayChannelRequestDO queryRequestByRequestId(String requestId);


	PayChannelRequestDO queryRequest(PayChannelRequestDO payChannelRequestDO);
	/**
	 *
	 * @param relationId
	 * @param channelRequestType
	 * @return
	 */
	PayChannelRequestDO queryRequestByRelationId(String relationId, PayEnums.CHANNEL_REQUEST_TYPE channelRequestType);
	/**
	 *
	 * @param requestUrl
	 * @return
	 */
	PayChannelRequestDO queryRequestByAccessId(String requestId,String requestUrl);
	/**
	 *
	 * @param accessStatus
	 * @return
	 */
	void updateRequestStatus(Long id, Integer accessStatus);
}
